<div class="modal-header" >
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>
    <h3>{{title}}</h3>
</div>
<div class="modal-body" ng-init=''>
    <div class="panel-body">
        <form class="form-validation form-horizontal" name="form"  method="post" novalidate>
            <div class="form-group">
                <label class="col-lg-2 control-label">角色名称:</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control ng-dirty"
                           ng-model="role.name" name="name" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">角色代码:</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control ng-dirty"
                           ng-model="role.code" name="code" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">角色隶属:</label>
                <div class="col-lg-10">
                    <ui-select allow-clear ng-model="role.tenantId" theme="bootstrap">
                        <ui-select-match placeholder="请选择..." class="">{{$select.selected.value.name}}</ui-select-match>
                        <ui-select-choices repeat="item.key as (key, item) in tenant | filter: { value: { name: $select.search }}">
                            <span ng-bind-html="item.value.name | highlight: $select.search"></span>
                        </ui-select-choices>
                    </ui-select>
                </div>
            </div>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <div class="form-group">
                <label class="col-lg-2 control-label">描述:</label>
                <div class="col-lg-10">
                    <textarea type="text" class="form-control" ng-model="role.desc" name="desc" ></textarea>
                </div>
            </div>
            <div class="panel panel-default cell" >
                <div ui-jq="tree" ui-delay="initTree"></div>
            </div>
        </form>
    </div>
</div>
<div class="modal-footer">
    <button type="button" data-dismiss="modal" class="btn btn-default" ng-click="cancel()">关闭</button>
    <button type="button" class="btn btn-default btn-danger" ng-disabled="form.$invalid" ng-click="ok(form.$valid)">保存</button>
</div>
 